﻿using System.Collections.ObjectModel;
using CharacterCreation.Data.Models;
using CharacterCreation.Data.Services;
using CharacterCreation.Views.Contracts;

namespace CharacterCreation.Views {
    /// <summary>
    /// The viewmodel 
    /// </summary>
    public class SkillSelectionListViewModel : BaseViewModel {
        private SkillService _skillService = SkillService.CreateInstance();

        /// <summary>
        /// Gets or sets the Skills
        /// </summary>
        public ObservableCollection<Skill> Skills {
            get { return _skillService.Items; }
        }

        /// <summary>
        /// Gets or sets the current skill
        /// </summary>
        public Skill CurrentSkill {
            get { return _skillService.CurrentItem; }
            set { 
                _skillService.CurrentItem = value;
                RaisePropertyChanged("CurrentSkill");
            }
        }

        public SkillSelectionListViewModel() {
        }
    }
}
